//
//  VipTipsCell.m
//  Shengzhuli
//
//  Created by FXGuo on 2017/7/26.
//  Copyright © 2017年 kamangkeji. All rights reserved.
//

#import "VipTipsCell.h"
#import "SZLAccountHelper.h"

@interface VipTipsCell ()

@property (weak, nonatomic) IBOutlet UILabel *typeLab;
@property (weak, nonatomic) IBOutlet UILabel *tipsLab;
@property (weak, nonatomic) IBOutlet UIView *moneyView;
@property (nonatomic,weak) UIButton *lastSelect;
@property (weak, nonatomic) IBOutlet UIButton *firstBtn;

@end

@implementation VipTipsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.lastSelect = self.firstBtn;
    self.firstBtn.selected = YES;
    self.lastSelect = self.firstBtn;
}
- (void)setType:(NSInteger)type
{
    _type = type;
    if (type == 3) {
        self.typeLab.text = @"＊学员(1980元)";
        self.tipsLab.text = @"1.成为玩转地球尊贵体验官，可以获得积分180购买商城中所有商品。\n2.免费参加玩转地球举办的全部活动，红酒俱乐部、旗袍俱乐部等等。\n";
        self.moneyView.hidden = YES;
    }else {
        self.typeLab.text = [NSString stringWithFormat:@"＊合伙人(20000元 ,还需支付%@元)",self.model.moneyDifference];
        self.tipsLab.text = @"1.拥有玩转地球尊贵合伙人身份。\n2.可以建立属于您自己的俱乐部。\n3.平台全部资源可免费使用。\n4.发布商品供用户购买。\n5.打造自己的人脉银行。\n6.商品销售提成机制";
        self.moneyView.hidden = NO;
    }
    if ([SZLAccountHelper shareInstance].roleId == 2) {
        self.moneyView.hidden = YES;
    }
}
- (IBAction)selectMoney:(UIButton *)btn
{
    if (btn == self.lastSelect) return;
    btn.selected = YES;
    self.lastSelect.selected = NO;
    self.lastSelect = btn;
    if (self.moneySelectBlock) {
        self.moneySelectBlock(btn.tag);
    }
}

@end
